<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<h1>这里测试评论表</h1>
<form action="/addComm" method="post">

  <div>
    <label for="content">评论：</label>
    <textarea id="content" name="content" required></textarea>
  </div>
  <div>
    <button type="submit">提交评论</button>
  </div>
</form>
<table>
  <thead>
  <tr>
    <th>comm_id</th>
    <th>comm</th>
  </tr>
  </thead>
  <tbody>
  <tr th:each="comms: ${comms}">
    <td th:text="${comms.user_id}"></td>
    <td th:text="${comms.comm}"></td>
    <td>
      <form action="/deleteCommById" method="post">
        <button type="submit" name="comm_id" th:value="${comms.comm_id}">Delete</button>
      </form>
    </td>
  </tr>
  </tbody>
</table>
</body>
</html>